import request from "@/utils/request";

// 用户登录
export function getQuestionList(data) {
  return request({
    url: "/api/exam/question/getList",
    method: "post",
    data,
  });
}

export function batchCreate(data) {
    return request({
      url: "/api/exam/question/batchCreate",
      method: "post",
      data,
    });
  }

  export function batchDelete(id) {
    return request({
      url: `/api/exam/question/${id}`,
      method: "DELETE",
    });
  }

  export function batchUpdate(id, data) {
    return request({  
      url: `/api/exam/question/${id}`,
      method: "PUT",
      data,
    });
  }

  export function batchUpdateLabels(data) {
    return request({  
      url: `/api/exam/question/batchUpdateLabels`,
      method: "post",
      data,
    });
  }

  export function download() {
    return request({
      url: "/api/exam/question/templateDownload",
      method: "get",
      headers: {
        "Content-Type": "application/x-www-form-urlencoded",
      },
    });
  }
